<template>
  <el-dialog :visible.sync="visible" title="录入token" :close-on-click-modal="false" :close-on-press-escape="false">
    <div>打开网址：http://dev.www.yunsuanfang.com:1081/auth/login</div>
    <div>账号：zhangxf-ceshi</div>
    <div>密码：Qwer1234</div>
    <div>登录之前打开F12-网络，找到token接口，点击查看返回参数，将access_token值复制黏贴到下方输入框</div>
    <div style="margin-top:25px">
      <el-input v-model="input" placeholder="请输入token" style="width:400px;"></el-input>
    </div>
    <template slot="footer">
      <el-button @click="visible = false">{{ $t('cancel') }}</el-button>
      <el-button type="primary" @click="query()">{{ $t('confirm') }}</el-button>
    </template>
  </el-dialog>
</template>

<script>
export default {
  data () {
    return {
      visible: false,
      input: ''
    }
  },
  methods: {
    init () {
      this.visible = true
    },
    query () {
      this.$emit('query', this.input)
    }
  }
}
</script>

<style lang="scss">
</style>
